Skip to content

release: install readiness from packaged crate - #2910

Merged
EffortlessSteven merged 3 commits into
mainfrom
codex/issue2834-packaged-install
Aug 5, 2026
Merged

EffortlessSteven merged 3 commits into
mainfrom
codex/issue2834-packaged-install

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Aug 5, 2026 •

Copy link
Copy Markdown
Member

What this does

Closes the packaged-install portion of #2834 without changing the release candidate or publication state.

cargo xtask release-readiness now packages the requested ripr crate, validates and extracts its gzip/tar archive outside the workspace, installs from that extracted source with an absolute install root, compares installed and workspace binary digests, verifies ripr --version, and runs doctor --root <external-fixture> --json before cleanup. The package/install gate re-checks worktree cleanliness immediately before packaging and fails required when state is dirty or unverifiable.

Scope and claim boundary

Verification

Check Result
archive fixtures pass: outside-root, foo/../escape, symlink, and hardlink rejection
validator unit tests pass: binary identity, version output, doctor JSON status, external fixture root
cargo check -p xtask --all-targets pass
cargo clippy -p xtask --all-targets -- -D warnings pass
cargo test -p xtask pass: 1,431 passed, 0 failed
cargo xtask precommit pass
clean-head cargo xtask release-readiness --version 0.10.0 pass: required package-install; archive/install/identity/version/doctor evidence recorded
readiness overall warn only for the existing advisory repo-exposure latency check; no required check failed

The clean-head rehearsal is a package-proof rehearsal, not 0.11 candidate qualification. The broad check-pr lane is governed by hosted/current-main evidence and is not represented as green here while its routed check is still in progress.

Review map

  • xtask/src/reports/release.rs: fail-closed package/install gate, typed validation helpers, archive safety, bounded external temp-root selection, and focused fixtures.
  • xtask/src/run.rs: cwd-bound captured process output for external package and fixture commands.
  • policy/process_allowlist.txt: command-runner receipt for the packaged-release smoke.
  • docs/OUTPUT_SCHEMA.md, docs/PR_AUTOMATION.md, docs/INSTALLATION_VERIFICATION.md: packaged-crate evidence contract.

Review response

All six actionable review threads were repaired, answered with exact-head proof, and resolved on ce3caaec6:

  • package-time dirty/unknown state now fails required;
  • identity/version/doctor assertions have named unit coverage;
  • extraction rejects outside-root, traversal, symlink, and hardlink entries;
  • canonicalization failures and bounded parent traversal are explicit;
  • the exact-head full xtask suite and package-readiness rehearsal passed.

Known limitations

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@EffortlessSteven, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a7d40cdb-d5fa-409e-bf13-1abb38079de8

📥 Commits

Reviewing files that changed from the base of the PR and between 8d3f01c and 4bbe5f9.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • docs/INSTALLATION_VERIFICATION.md
  • docs/OUTPUT_SCHEMA.md
  • docs/PR_AUTOMATION.md
  • policy/process_allowlist.txt
  • xtask/Cargo.toml
  • xtask/src/reports/release.rs
  • xtask/src/run.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 35.78337% with 332 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
xtask/src/reports/release.rs 37.00% 315 Missing ⚠️
xtask/src/run.rs 0.00% 17 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • clean_tree is consumed by publish_dry_run_check via clone(), and package_install_check's Ok(false)/Err arms only mark the gate 'not_run'. A dirty tree at package time still produces a non-failing result; the gate is no longer fail-closed. Require either re-running git status in package_install_check or fail (not not_run) when clean_tree is false.
  • package_install_check / run_packaged_install has no unit test asserting the identity-diff, ripr --version substring, or doctor --json status == "pass"; rely on integration cargo test -p xtask to catch regressions via the readiness report schema only.
  • extract_packaged_crate negative test only covers entry outside expected_root. Code also rejects symlinks, hardlinks, RootDir/ParentDir/Prefix components; add tar archives containing a symlink target and a 'foo/../escape' entry to prove rejection and prevent zip-slip regression.
  • release_temp_root silently falls back via unwrap_or when canonicalize fails; combine with no-iteration-cap parent walk this could allow fixtures under the source tree on adversarial temp setups. Add canonicalize errors and a bounded parent walk with an explicit escape-error.
  • Extract-safety invariants (symlink/hardlink rejection, ParentDir/RootDir/Prefix component rejection, destination traversal) lack unit tests. Add focused tests so the guards cannot regress without detection.
  • extract_packaged_crate rejects symlinks/hardlinks in code but the only unit test covers outside-root entries. Add a tar fixture with a symlink entry to prove link-rejection is enforced, otherwise fail-closed claim is partial.

Confirmed findings

  • package_install_check receives clean_tree by value and its Ok(false)/Err branches return not_run without re-checking git state, so dirty tree after package step still records a not_run rather than fail.
  • release_temp_root walks up parents until external but never verifies canonicalization succeeded for the returned candidate, allowing symlinked temp dirs to land inside the workspace.
  • active-view invariants hold; residual risk is OS-specific canonicalize fallback in release_temp_root which is an active-cwd concern rather than a buffer-view bug.
  • Diff class is source-ub in Rust (xtask release-readiness packaging/install/doctor fixture). No JS-backed worker, async, GC, detach, or transferable boundary is introduced or modified by this PR. ub-worker-handoff lane is out of scope; no actionable worker-handoff issue.
  • release_temp_root walks parent until outside cwd; no test asserts it never returns cwd or a subpath, leaving a quiet UB/oracle hole if std::env::temp_dir resolves inside the workspace.

Verification questions

[review body truncated; see review artifacts]

[review body truncated; see review artifacts]

Comment thread xtask/src/reports/release.rs Resolved
Comment thread xtask/src/reports/release.rs Resolved
Comment thread xtask/src/reports/release.rs Resolved
Comment thread xtask/src/reports/release.rs Resolved
Comment thread xtask/src/reports/release.rs Resolved
Comment thread xtask/src/reports/release.rs Resolved
@EffortlessSteven

Copy link
Copy Markdown
Member Author

Local closeout update on exact head cb53699: cargo test -p xtask passed 1,427/1,427 and cargo xtask precommit passed. cargo xtask check-pr reached the workspace test gate but failed four existing crates/ripr/tests/cli_smoke.rs cases because the doctor rustc probe timed out at its 5s bound, plus pr_summary_does_not_invoke_cargo exceeded its 10s budget. This PR does not touch those surfaces. The exact doctor_reports_missing_config_defaults case passed on pristine origin/main 8d3f01c in an isolated target, so the broad failure is retained as a current runner/Cargo contention limitation, not claimed as a package-install failure. Required hosted checks remain GitHub-owned; the PR stays draft.

@EffortlessSteven
EffortlessSteven force-pushed the codex/issue2834-packaged-install branch from cb53699 to db1d12c Compare August 5, 2026 00:34
@EffortlessSteven

Copy link
Copy Markdown
Member Author

Final local proof is on current head db1d12c (documentation-only amendment after the implementation head): cargo xtask precommit passed. The package-install receipt remains valid for the unchanged production implementation at cb53699; the amendment only clarifies that the old path-install block is supplemental and cannot substitute for the packaged-crate receipt. PR remains draft while hosted checks/review are remote-owned. No merge or release-candidate state changed.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review August 5, 2026 01:02
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce3caaec6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread xtask/src/reports/release.rs Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • PR body claims clean-head cargo xtask release-readiness --version 0.10.0 required/pass; this is a 0.10.0 rehearsal, not 0.11 candidate qualification, but docs do not pin which version the receipt binds to.
  • Lane scope (resizable buffer / active-view vs backing store, TypedArray detach/transfer, stale length snapshots) is not engaged by this diff. xtask release-readiness touches Rust file I/O and process invocation only; no JS/WASM/JS-engine buffer object is reachable from changed code. No blocker/high/medium actionable issue under this lane.
  • This lane is JS/TS-worker-handoff scoped; the PR is Rust-only xtask release-readiness. No MessagePort, postMessage, transferable, detached buffer, or worker-handoff surface is touched, so no lane-specific blocker/high/medium finding is produced. Residual risk: capture_output_in_dir blocks the caller; not a worker-handoff concern.
  • validate_binary_identity, validate_installed_version, and validate_doctor_result are tested for the rejection paths and one positive case each, but no test pins down that the digests fed in are actually produced by sha256 over distinct on-disk binaries (e.g., tampered-digest pair or swapped arguments). This is submaterial polish relative to the named-validator coverage claim.
  • PR claims 1431 unit tests passed; local comment notes 1427 at cb53699 and 1431 at ce3caae. The unit-test count delta is consistent with the five new tests in diff (extraction/symlink-hardlink/traversal/identity-version-doctor/fixture-root), but no third-party receipt corroborates the new total.
  • package_install_check still re-reads git_worktree_is_clean inline before run_packaged_install; consider passing the freshness check as an explicit dependency (e.g., a fn(&Path) -> Result<bool, String> injected at construction) so the gate can be unit-tested without depending on the real worktree.

Verification questions

  • Confirm run.rs addition capture_output_in_dir is a synchronous Command::new(...).current_dir(...).output() that buffers stdout/stderr into owned String. No async, no spawn, no worker thread, no lifetime/ownership of buffers across a boundary.
  • Confirm pR omits negative tests for cargo install failure in run_packaged_install (missing installed_binary branch returns Ok(false) without asserting); doctor JSON shape not asserted (only status pass); archive digest recorded but not asserted to match a re-extract. These are test-oracle gaps.
  • Confirm extract_packaged_crate end-to-end fixtures cover outside-root, symlink, hardlink rejection but do not construct an entry whose path starts with expected_root yet traverses via foo/../escape.
  • Confirm validate_binary_identity checks inequality of two strings; never verifies digests are actually sha256 over real binaries (e.g., could be empty hashes, could be tampered workspace hash, could be cross-checked against installed path content).
  • Confirm capture_output_in_dir in xtask/src/run.rs duplicates capture_output's command+output+utf8-lossy shape, differing only by current_dir and a context label; two helpers add surface area without a documented reason.

Verification questions

Refuted

[review body truncated; see review artifacts]

[review body truncated; see review artifacts]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant